package com.kimehwa.studyboot.tx;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

/**
 * @author xiaodongguan
 * @description
 * @since 2021-08-29 14:20
 */
@Service
public class UserService1 {
    @Autowired
    private UserDao userDao;

    @Transactional
    public void insert() {
        userDao.insert();
        System.out.println("插入完成....");
        int i = 10 / 0;
    }
}
